<div class="row block" >



<div>
    <div class="panel panel-primary">

        <div class="panel-heading">
            <span class="panel-controls">
                <button class="btn btn-primary" uib-tooltip="刷新" ng-click="approval.reload()" ><i class="fa fa-refresh fa-fw" ng-class="{'fa-spin':!approval.loadover}" ></i></button>
            </span>
            <h5>我的审批</h5>
        </div>

        <div class="panel-body" ng-init="ns = { 'null': '未发送', 'sending': '发送中', 'done':'完成', 'skip': '忽略', 'fail': '失败'}">
            <div class="panel-tabs">
                <table ng-table="approval.dataTable" class="table table-hover text-center table-condensed" show-filter="true">
                    <tr ng-repeat="d in $data">
                        <td style="width: 10%" data-title="'创建时间'" filter="{ create_time: 'text'}" sortable="'create_time'">{{d.create_time}}</td>
                        <td style="width: 10%" data-title="'结束时间'" filter="{ finishtime: 'text'}" sortable="'finishtime'">{{d.finishtime}}</td>
                        <td style="width: 10%" data-title="'耗时'">{{ approval.seftime(d.create_time,d.finishtime)}}</td>
                        <td style="width: 10%" data-title="'提交人'" filter="{ submitter: 'text'}" sortable="'submitter'">{{d.submitter}}</td>
                        <td style="width: 20%" data-title="'审批名称'" filter="{ name: 'text'}" sortable="'name'">{{d.name}}</td>
                        <td style="width: 10%" data-title="'OA单号'" filter="{ oauuid: 'text'}" sortable="'oauuid'">
                            <a ng-if="d.oauuid==0"> 尚未发送</a>
                            <a ng-if="d.oauuid==1"> 创建中</a>
                            <a ng-if="d.oauuid!=0 && d.oauuid!=1">{{d.oauuid}}</a>
                        </td>
                        <td style="width: 10%" data-title="'通知状态'" >{{ns[d.notifystatus]}}</td>
                        <td style="width: 10%" data-title="'审批状态'" sortable="'opinion'">
                            <a ng-if="d.opinion == 'agree'" style="color: green"> 同意 </a>
                            <a ng-if="d.opinion == 'unconfirmed'"> 未审批 </a>
                            <a ng-if="d.opinion == 'refuse'" style="color: red"> 拒绝 </a>
</td>
                        <td style="width: 10%" data-title="'操作'">
                            <button ng-if="d.opinion=='unconfirmed'" class="btn btn-primary btn-sm" ng-click="approval.edit(d.uuid,1)">审批</button>
                            <button ng-if="d.opinion!='unconfirmed'" class="btn btn-info btn-sm" ng-click="approval.edit(d.uuid,0)">查看</button>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>



</div>
